3.5.22 \(\int \frac {A+B \cos (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx\) [422]

Optimal. Leaf size=228 \[ \frac {2 A \sqrt {a+b} \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \Pi \left (\frac {a+b}{b};\text {ArcSin}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b d} \]

[Out]

2*A*cot(d*x+c)*EllipticF((a+b*cos(d*x+c))^(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),((-a-b)/(a-b))^(1/2))*(a+b)^(1/2)
*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a*(1+sec(d*x+c))/(a-b))^(1/2)/a/d-2*B*cot(d*x+c)*EllipticPi((a+b*cos(d*x+c))^
(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),(a+b)/b,((-a-b)/(a-b))^(1/2))*(a+b)^(1/2)*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a
*(1+sec(d*x+c))/(a-b))^(1/2)/b/d

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 228, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {3085, 2888, 2895} \begin {gather*} \frac {2 A \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{a d}-\frac {2 B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{b};\text {ArcSin}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{b d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*Cos[c + d*x])/(Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]),x]

[Out]

(2*A*Sqrt[a + b]*Cot[c + d*x]*EllipticF[ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sqrt[Cos[c + d*x]])], -((
a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a - b)])/(a*d) - (2*Sqrt[a
+ b]*B*Cot[c + d*x]*EllipticPi[(a + b)/b, ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sqrt[Cos[c + d*x]])], -
((a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a - b)])/(b*d)

Rule 2888

Int[Sqrt[(b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[2*b*(Tan
[e + f*x]/(d*f))*Rt[(c + d)/b, 2]*Sqrt[c*((1 + Csc[e + f*x])/(c - d))]*Sqrt[c*((1 - Csc[e + f*x])/(c + d))]*El
lipticPi[(c + d)/d, ArcSin[Sqrt[c + d*Sin[e + f*x]]/Sqrt[b*Sin[e + f*x]]/Rt[(c + d)/b, 2]], -(c + d)/(c - d)],
 x] /; FreeQ[{b, c, d, e, f}, x] && NeQ[c^2 - d^2, 0] && PosQ[(c + d)/b]

Rule 2895

Int[1/(Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(
Tan[e + f*x]/(a*f))*Rt[(a + b)/d, 2]*Sqrt[a*((1 - Csc[e + f*x])/(a + b))]*Sqrt[a*((1 + Csc[e + f*x])/(a - b))]
*EllipticF[ArcSin[Sqrt[a + b*Sin[e + f*x]]/Sqrt[d*Sin[e + f*x]]/Rt[(a + b)/d, 2]], -(a + b)/(a - b)], x] /; Fr
eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && PosQ[(a + b)/d]

Rule 3085

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin
[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist[B/d, Int[Sqrt[c + d*Sin[e + f*x]]/Sqrt[a + b*Sin[e + f*x]], x], x] -
 Dist[(B*c - A*d)/d, Int[1/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e
, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rubi steps

\begin {align*} \int \frac {A+B \cos (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx &=A \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx+B \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a+b \cos (c+d x)}} \, dx\\ &=\frac {2 A \sqrt {a+b} \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \Pi \left (\frac {a+b}{b};\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.63, size = 144, normalized size = 0.63 \begin {gather*} \frac {2 \sqrt {2} \sqrt {\cos (c+d x)} \sqrt {\frac {a+b \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \left ((A-B) F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right )+2 B \Pi \left (-1;\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right )\right )}{d \sqrt {a+b \cos (c+d x)} \sqrt {\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Cos[c + d*x])/(Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]),x]

[Out]

(2*Sqrt[2]*Sqrt[Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*((A - B)*EllipticF[ArcSi
n[Tan[(c + d*x)/2]], (-a + b)/(a + b)] + 2*B*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], (-a + b)/(a + b)]))/(d*S
qrt[a + b*Cos[c + d*x]]*Sqrt[Cos[c + d*x]*Sec[(c + d*x)/2]^2])

________________________________________________________________________________________

Maple [A]
time = 0.30, size = 197, normalized size = 0.86

method result size
default \(\frac {2 \left (A \EllipticF \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {-\frac {a -b}{a +b}}\right )-B \EllipticF \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {-\frac {a -b}{a +b}}\right )+2 B \EllipticPi \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, -1, \sqrt {-\frac {a -b}{a +b}}\right )\right ) \left (\sin ^{2}\left (d x +c \right )\right ) \sqrt {\frac {a +b \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{d \sqrt {a +b \cos \left (d x +c \right )}\, \left (-1+\cos \left (d x +c \right )\right ) \sqrt {\cos \left (d x +c \right )}}\) \(197\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cos(d*x+c))/cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/d*(A*EllipticF((-1+cos(d*x+c))/sin(d*x+c),(-(a-b)/(a+b))^(1/2))-B*EllipticF((-1+cos(d*x+c))/sin(d*x+c),(-(a-
b)/(a+b))^(1/2))+2*B*EllipticPi((-1+cos(d*x+c))/sin(d*x+c),-1,(-(a-b)/(a+b))^(1/2)))*sin(d*x+c)^2*((a+b*cos(d*
x+c))/(1+cos(d*x+c))/(a+b))^(1/2)/(a+b*cos(d*x+c))^(1/2)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/(-1+cos(d*x+c))/cos
(d*x+c)^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))/cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((B*cos(d*x + c) + A)/(sqrt(b*cos(d*x + c) + a)*sqrt(cos(d*x + c))), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))/cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral((B*cos(d*x + c) + A)*sqrt(b*cos(d*x + c) + a)*sqrt(cos(d*x + c))/(b*cos(d*x + c)^2 + a*cos(d*x + c)),
 x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \cos {\left (c + d x \right )}}{\sqrt {a + b \cos {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))/cos(d*x+c)**(1/2)/(a+b*cos(d*x+c))**(1/2),x)

[Out]

Integral((A + B*cos(c + d*x))/(sqrt(a + b*cos(c + d*x))*sqrt(cos(c + d*x))), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))/cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((B*cos(d*x + c) + A)/(sqrt(b*cos(d*x + c) + a)*sqrt(cos(d*x + c))), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+B\,\cos \left (c+d\,x\right )}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {a+b\,\cos \left (c+d\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*cos(c + d*x))/(cos(c + d*x)^(1/2)*(a + b*cos(c + d*x))^(1/2)),x)

[Out]

int((A + B*cos(c + d*x))/(cos(c + d*x)^(1/2)*(a + b*cos(c + d*x))^(1/2)), x)

________________________________________________________________________________________